<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ page session="true"%>
<%@page import="java.util.*"%>
<%@page import="tr.com.argela.tap.mot.models.Project"%>
<%@page import="tr.com.argela.tap.mot.models.Module"%>
<%@page import="tr.com.argela.tap.mot.models.User"%>
<%@page import="tr.com.argela.tap.mot.dao.ModuleDao"%>
<%@page import="tr.com.argela.tap.mot.dao.ProjectDao"%>
<%@page import="java.sql.*"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
   <html>
<head>

<title>JSP Page</title>
<link rel="stylesheet" type="text/css" href="style/styles.css">
</head>
<body>
 
  <%
     User user = (User)request.getSession().getAttribute("userObject");
     String name = user.getName();
     Long id = user.getId();
%>

   
    	<h4 align="right">Welcome <%=name%></h4>
    	<h5 align="right"><a href="logout.jsp">Log out</a></h5>
         <div > <h1 align="center">MOT</h1><h5 align="center">Memory Of Testing</h5></div>
        <div align="left">
        <table align="left"><tr><td>
      <h3><a href="analystModel.jsp?id=<%=id%>">Modules</a></h3></td></tr><tr><td>
        <h3><a href="analystPoint.jsp?id=<%=id%>">Test points</a></h3></td></tr><tr><td>
        <h3><a href="analystCase.jsp?id=<%=id%>">Test Cases</a></h3></td></tr><tr><td>
        <h3><a href="export.jsp?id=<%=id%>">Export Document</a></h3></td></tr>
        </table></div>
          
        <dıv align="right">
<%
if(request.getParameter("id5")==null)
{	
	response.sendRedirect("home2.jsp");
	return;
}

ModuleDao moduleDao2 = new ModuleDao();
Module module = moduleDao2.checkmodule(Long.parseLong((String)request.getParameter("id5")));


%>


<table border="2" align="center">

<tr>
<th align="center" colspan="2">Module <%=module.getId()%>'s properties</th>
</tr><tr>
<th>Module ID</th>
<td><%=module.getId()%></td>
<tr>
<th>Module Name</th>
<td><%=module.getName()%></td>
</tr><tr>
<th>User Name</th>
<td><%=module.getUser().getName()%></td>
</tr><tr>
<th>Module Description</th>
<td><%=module.getDescription()%></td>
</tr><tr>
<th>Project Name</th>
<td><%=module.getProject().getName()%></td>
</tr>
</table>
<h4 align="center"><a href="thisTestPoint2.jsp?id6=<%=module.getId()%>">Test Point</a></h4>
<h4 align="center"><input  type="hidden" name="version" id="version" value="thismoduleversion"/><a href="thismoduleversion2.jsp?id7=<%=module.getId()%>"> This Module Versions</a></h4>
	    
 </dıv>
</body>
</html>